package service;

import Dao.InteractionDao;
import model.Interaction;

import java.util.List;

public class InteractionService {
    private InteractionDao interactionDao = new InteractionDao();

    // 插入互动记录
    public boolean insertInteraction(Interaction interaction) {
        return interactionDao.insertInteraction(interaction);
    }

    // 获取用户对商品的互动记录数量
    public int getInteractionCount( int productId, int type) {
        return interactionDao.getInteractionCount(productId, type);
    }

    // 获取所有互动记录
    public List<Interaction> getAllInteractions() {
        return interactionDao.getAllInteractions();
    }
}